/*
 * @Author: Dorange.Wang
 * @Date: 2021-04-27 09:35:38
 * @LastEditors: your name
 * @LastEditTime: 2021-06-21 16:57:57
 * @Description: file content
 */
import customPalette from './palette/CustomPalette'
import PaletteProvider from './palette/CustomPaletteProvider'
import CustomRenderer from './render/CustomRenderer'
import ContextPadProvider from './customContextPad/CustomContextPadProvider'

import CreateModule from 'diagram-js/lib/features/create'
import SpaceToolModule from 'diagram-js/lib/features/space-tool'
import LassoToolModule from 'diagram-js/lib/features/lasso-tool'
import HandToolModule from 'diagram-js/lib/features/hand-tool'
import GlobalConnectModule from 'diagram-js/lib/features/global-connect'
import translate from 'diagram-js/lib/i18n/translate'

// 除了引进的模块的名字可以修改，其他的不建议修改，会报错
export default {
  __depends__: [
    {
      // __init__: ['customPalette'],
      __init__: ['customPalette', 'customRenderer'],
      customPalette: ['type', customPalette],
      customRenderer: ['type', CustomRenderer]
    },
    CreateModule,
    SpaceToolModule,
    LassoToolModule,
    HandToolModule,
    GlobalConnectModule,
    translate
  ], // 依赖于 customPalette 这个模块
  __init__: ['customPaletteProvider', 'contextPadProvider'], // 调用 customPaletteProvider 来初始化
  customPaletteProvider: ['type', PaletteProvider],
  contextPadProvider: ['type', ContextPadProvider]
}
